package com.bruce.pattern.structural.decorator.v1;

import org.junit.Test;

/**
 * Created by bruce on 2018/11/3 22:55
 */
public class MainTest {

    @Test
    public void test1() {
        Battercake battercake = new Battercake();
        System.out.println(battercake.getDesc() + " 价格:" + battercake.cost());

        BattercakeWithEgg battercakeWithEgg = new BattercakeWithEgg();
        System.out.println(battercakeWithEgg.getDesc() + " 价格:" + battercakeWithEgg.cost());

        BattercakeWithEggSausage battercakeWithEggSausage = new BattercakeWithEggSausage();
        System.out.println(battercakeWithEggSausage.getDesc() + " 价格:" + battercakeWithEggSausage.cost());
    }




}
